package com.xingfly.model;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * Tag和对象类型的关系
 * Created by SuperS on 2016/12/7.
 */
@Entity
@Table(name = "xf_relation")
public class Relation extends BaseModel{


    @OneToOne
    @JoinColumn(name = "tag_id")
    private Tag tag;

    private int objectType;
    private Long objectId;

    public Tag getTag() {
        return tag;
    }

    public void setTag(Tag tag) {
        this.tag = tag;
    }

    public int getObjectType() {
        return objectType;
    }

    public void setObjectType(int objectType) {
        this.objectType = objectType;
    }

    public Long getObjectId() {
        return objectId;
    }

    public void setObjectId(Long objectId) {
        this.objectId = objectId;
    }
}
